Cost-based deployment of components in smart item environments

ABSTRACT

One or more distributions, to service execution environments, of component services associated with a composite service associated with an analysis of data generated by one or more sensors, may be determined, the composite service including an ordering of execution of the associated component services for the analysis of the data, at least one of the service execution environments located at a first network node associated with a device layer and at least one other one of the service execution environments located at a second network node associated with a middleware layer. An evaluation of each of the distributions of the component services may be determined based on a metric associating weighted values with a consumption by each distribution of respective resources associated with each of the first and second network nodes. A recommendation including one or more of the distributions may be determined based on the evaluation.

TECHNICAL FIELD

This description relates to smart item technologies.

BACKGROUND

Smart item technologies may include, for example, radio-frequency identification (RFID) systems, embedded systems, sensor motes, and/or sensor networks, and may be used, for example, to provide business software applications with fast access to real-world data. For example, smart item technologies may be used support the detection, reading, or writing of RFID tags, as well as to support communication with, and control of, wireless sensor networks and embedded systems. In many instances, smart items may include devices having local processing power, memory, and/or communication capabilities, that are capable of providing data about the device and its properties, or information about a current state or environment of the smart item devices. For example, a physical object may include a product embedded information device (PEID), which may include, for example, an embedded computing unit, an RFID tag, etc., to enable close coupling of real world events to backend information systems. Accordingly, some such devices may be used in the execution of service components of back-end or underlying business applications to collect, process, or transmit business data.

Examples of smart item devices include an RFID tag, which may be passive or active, and which may be attached to an object and used to provide product or handling information related to the object. Other examples of smart item devices includes various sensors, such as, for example, environmental sensors (e.g., a temperature, humidity, or vibration sensor), which may be capable of communicating to form one or more sensor networks. These and other types of smart item devices also may include embedded systems, which may refer generally to any system in which a special-purpose processor and/or program is included, and/or in which the system is encapsulated in the device being controlled or monitored.

Through automatic real-time object tracking, smart item technology may provide businesses with accurate and timely data about business operations, and also may help streamline and automate the business operations. Accordingly, cost reductions and additional business benefits (e.g., increased asset visibility, improved responsiveness, and extended business opportunities) may be obtained.

As an example scenario, a business may need to track a lifecycle of a product. A product's lifecycle may include the phases beginning-of-life (e.g., design, production), middle-of-life (e.g., use, maintenance), and end-of-life (e.g., recycling, disposal). Example business goals related to product lifecycle management may include design improvements, adjustment of production parameters, flexible maintenance planning, and effective recycling. In order to achieve these business goals, the business may need to acquire information relating to the actual behavior and condition of the product. As an example, PEIDs with attached sensors can monitor the usage of products and their environment during their whole lifecycle and make the recorded data available to backend systems, such as maintenance planning, fleet management, and product data management (PDM) systems. Depending, for example, on the number of sensors embedded in the product and the respective sampling rates, large amounts of data may be generated for a single product. This may become even more problematic when multiple products need to be monitored (e.g., in a truck fleet). Furthermore, if products are mobile, they may have only a low bandwidth network or intermittent network connection. Therefore, the transmission of raw field data to backend systems may not be feasible in many cases.

Some systems may use message-oriented middleware to enable communication between smart items such as PEIDs and backend systems. For example, the middleware may be configured to transport data from a PEID to a backend system, where the data may then be processed. In the area of wireless sensor networks, for example, middleware may be used for connection of the wireless sensor nodes of the wireless sensor network, either among the nodes themselves or to the backend application for further evaluation and processing of the data. In this context, there may exist intermittent connections, for example, due to movement of the nodes that enable the communication. Thus, data or results may either be lost, or may need to be stored on the nodes.

For some smart items for which very large amounts of real-time data need to be processed, for example, the storage capacity and/or the processing capacity of the nodes may be insufficient to handle the data, and thus dependability or integrity of results may be compromised. For example, while recording real-world data of products using PEIDs enables more accurate analysis, it also may pose the problem of creating large amounts of data by periodic recording from sensors (e.g., sampling). Depending, for example, on the type of sensor and the data resolution required for a particular application, a sampling frequency may be defined. For example, an outside temperature sensor may be read in intervals of a predefined number of minutes, as temperature variations may be expected to occur gradually, in a range of minutes. In contrast, an acceleration sensor which may be used to detect vibration patterns may be read a few hundred times per second, as otherwise, relevant vibrations may not be detected. Assuming that for each recording a 4 Byte numeric value is stored, the temperature sensor may create 5.625 KBytes of raw data per day (i.e., 1 sample per minute), whereas the acceleration sensor may create 33750 KBytes of raw data per day (i.e., 100 samples per second).

Since PEIDs may have limited memory capacity, they may not be able to store the recorded data for long time periods. Therefore, the data may need to be transmitted to another system for analysis or be processed locally with the results being sent to backend systems, if needed. However, performing all necessary analysis on the product and transmitting only the result may not be feasible, as a PEID may have very limited resources and/or power supply and/or connectivity. Moreover, for example, some data processing steps may require additional input from secondary databases or other products, which may not be available on the individual product. However, a mere determination of placements in the network of executables for performing the data processing may lead to inefficiencies, including, for example, unacceptable throughput levels.

SUMMARY

According to one general aspect, one or more distributions, to service execution environments, of component services associated with a composite service associated with an analysis of data generated by one or more sensors, may be determined, the composite service including an ordering of execution of the associated component services for the analysis of the data, at least one of the service execution environments located at a first network node associated with a device layer and at least one other one of the service execution environments located at a second network node associated with a middleware layer that includes a request handling layer and a device handling layer. An evaluation of each of the distributions of the component services may be determined based on a metric associating one or more weighted values with a consumption by the each distribution of one or more respective resources associated with each of the first and second network nodes. A recommendation including one or more of the distributions based on the evaluation may be determined.

According to another general aspect, a system may include a middleware layer including a request handling layer and a device handling layer, the middleware layer in communication with an application and a device layer including one or more devices. The request handling layer may include a service repository that is configured to store at least one composite service in association with service metadata describing an ordering of execution of component services of the composite service. The request handling layer may further include a distribution manager that is configured to determine one or more distributions, to service execution environments, of the component services associated with the composite service associated with an analysis of data generated by one or more sensors, the composite service including the ordering of execution of the associated component services for the analysis of the data, at least one of the service execution environments located at a first network node included in the device layer and at least one other one of the service execution environments located at a second network node included in the middleware layer, determine an evaluation of each of the distributions of the component services based on a metric associating one or more weighted values with a consumption by the each distribution of one or more respective resources associated with each of the first and second network nodes, and determine a recommendation including one or more of the distributions based on the evaluation.

According to another general aspect, a distribution manager may be configured to determine one or more distributions, to service execution environments, of component services associated with a composite service associated with an analysis of data generated by one or more sensors, the composite service including an ordering of execution of the associated component services for the analysis of the data, at least one of the service execution environments located at a first network node included in the device layer and at least one other one of the service execution environments located at a second network node included in the middleware layer. The distribution manager may be further configured to determine an evaluation of each of the distributions of the component services based on a metric associating one or more weighted values with a consumption by the each distribution of one or more respective resources associated with each of the first and second network nodes, and to determine a recommendation including one or more of the distributions based on the evaluation.

The details of one or more implementations are set forth in the accompanying drawings and the description below. Other features will be apparent from the description and drawings, and from the claims.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of an example system for processing data obtained by smart item devices.

FIG. 2 is a block diagram illustrating an example composition of services.

FIG. 3 is a block diagram of an example infrastructure view of an example system for processing data obtained by smart item devices.

FIG. 4 is a block diagram illustrating an example composition of services.

FIG. 5 is a block diagram illustrating an example technique for component deployment planning.

FIG. 6 depicts an example undirected graph describing an example infrastructure.

FIG. 7 depicts an example directed graph describing an example composition of services.

FIG. 8 is a flowchart illustrating example operations of the system of FIG. 1 for determining an example recommendation for mapping components of a composite service.

FIG. 9 is a flowchart illustrating example operations of the system of FIG. 1 for product lifecycle management.

FIG. 10 depicts an example recommended distribution of the example composition of FIG. 4 on the example infrastructure of FIG. 3.

FIG. 11 depicts an example recommended distribution of the example composition of FIG. 4 on the example infrastructure of FIG. 3.

DETAILED DESCRIPTION

FIG. 1 is a block diagram of an example system 100 for processing data obtained by smart item devices. In the example of FIG. 1, various smart item devices, for example, a product 102 that includes a product embedded information device (PEID) 104 and a smart radio-frequency identification (RFID) reader 106, provide real-world data to one or more applications 108 in a timely and accurate manner, using middleware 110 to pre-process data received from the smart item devices. For example, the smart RFID reader 106 may read objects having an RFID tag, for example, a product 112 having RFID tags 114 and 116. For example, the product 112 may include a portable computer having the RFID tag 114 attached to its chassis and the RFID tag 116 attached to a mini-mouse. The smart RFID reader 106 may, for example, thus read, or sense the RFID tags 114 and 116 as a person carrying the portable computer carries the chassis and the mouse past a station having the smart RFID reader attached thereto. As another example, the PEID 104 may receive data from sensors 118 that may be stored in local data storage 120. For example, the sensors 118 may sense temperature, vibration, and/or pressure relating to the product 102. For example, the product 102 may include an engine having the PEID 104 attached thereto, and the sensors 118 may be configured, for example, to detect temperature, humidity, and/or vibration in close proximity to the engine.

A PEID such as the PEID 104 may contain data about a product and may transmit the data upon request. Data may be provided by reading from a local memory such as the local data storage 120 or by accessing sensors that are integrated in the product (e.g., the sensors 118). If the PEID is an embedded system, it may contain local data processing, e.g. for continuous recording of sensor data, or computation of statistics. PEIDs may be mobile, e.g. may be embedded in vehicles, and may connect to a device handler (such as the device handling layer 1 130) via a wireless connection.

In FIG. 1, each of the PEID 104 and the smart RFID reader 106 may include a central processing unit (CPU) and a memory (not shown), as well as other standard components. Further, the PEID 104 may include a service execution environment (SEE) 122 and the smart RFID reader 106 may include a service execution environment (SEE) 124. Thus, the PEID 104 and the smart RFID reader 106 should be understood to be capable of various levels of computing capabilities, including, for example, processing or transmitting sensed data. The service execution environments 122, 124 may include a container, in which services may be executed in an adaptable and flexible manner. Thus, the service execution environment 122 and the service execution environment 124 may be used for service relocation, for example, for relocating services that may pre-process raw data received by the smart item devices so that only pre-processed results may be sent to the application 108, instead of requiring all raw data to be transmitted to the application 108 for processing at the backend system.

Thus, example services that may be relocated to the service execution environment 122 and the service execution environment 124 may be configured to calculate, for example, a linear regression of data values, a moving average of data values, threshold monitoring, a notification, or a number of occurrences of an event or item. As an example, the service execution environments 122, 124 may be implemented utilizing an Open Services Gateway initiative (OSGi) service platform. Such an OSGi service platform may provide component management capabilities for dynamically deployable applications, libraries, and services. Using a platform such as OSGi, services may easily be deployed, started, stopped, and removed from the service execution environment. Thus, services, applications and service-oriented Applications Programming Interfaces (APIs) may be, for example, remotely downloaded to, upgraded in, or removed from mobile devices. Moreover, a unified service execution environment may be embedded in middleware nodes, PEIDs, and smart RFID readers to enable a flexible distribution of services. Preferably, services may be deployed and executed on PEIDs and middleware nodes.

Thus, the PEID 104 and the smart RFID reader 106 may be configured to collect, process, filter, aggregate, or transmit data that may be useful to the application 108, for example, a business data processing application. For example, the application 108 may include inventory management, supply chain management, retail store management, warehouse management, and any other process or application that may be used to execute business processes with respect to real-world objects, where such real-world objects may include, for example, products for sale, pallets or other shipment elements, patients, or manufacturing materials/equipment. By tracking and analyzing such real-world objects, the application 108 may be used, for example, to determine inventory levels, set pricing levels, evaluate marketing strategies, evaluate manufacturing or production technologies, reduce theft, or maintain safety. The application 108 may also be used for product lifecycle management (PLM), for example, to determine uses, locations, and conditions of products over time.

By including pre-processing capabilities at smart items such as the PEID 104 and the smart RFID reader 106, processing may be performed very early in the data-collection process(es), so that a burden placed on the application 108 may be reduced or eliminated. Further, the pre-processing may lessen the amount of data to be transmitted from the devices to the middleware layer. For example, the application 108 may be located at a corporate headquarters, and the PEID 104 and the smart RFID reader 106 may be dispersed across a large geographical region connected by a wide area network, which may be connected via wireless connections. As such, for example, the application 108 may only require certain subsets or characterizations of data collected by the PEID 104 and the smart RFID reader 106, and may not need or want all collected, raw data.

In some implementations, the application 108 may include compound or composite applications that are made from re-usable software components or services that are designed to perform some well-defined task(s). Also, in these or other implementations, the application 108 may include legacy applications that may not easily communicate with data-collection devices (or with other business data processing systems), and, in such cases, services or service components may be provided as interfaces between the legacy applications and the data collection devices and/or other systems. The system 100 may enable these and other applications and services to be deployed directly on the PEID 104 and the smart RFID reader 106, for example, via the service execution environments 122 and 124, so that, for example, services may be run on the devices (e.g., data may be collected and/or processed) in a timely, efficient, reliable, automated, cost-effective, and scalable manner.

Thus, for example, complex business processes, or composite services, may be decomposed into lightweight, portable individual services and may be deployed at different devices. For example, a service s5 126 (e.g., service s5 126 a and service s5 126 b) may be deployed and executed in the SEE 122 of the PEID 104 and in the SEE 124 of the smart RFID reader 106. As an example, a composite service may need a count of the number of readings per hour performed by a device such as the PEID 104 or the smart RFID reader 106. The service s5 126, for example, may be configured to calculate such a count for each of the PEID 104 and smart RFID reader 106. The pre-processed result may then be used, for example, by other decomposed services of the composite service. As another example, a service s4 128 may be deployed and executed in the SEE 124 of the smart RFID reader 106. However, the-PEID 104 and the smart RFID reader 106, for example, may not include sufficient processing or storage capabilities to handle all such decomposed services that the application 108 may require for processing data.

The middleware layer 110 may include a device handling layer 1 130 that may include a service execution environment 132, and a device handling layer 2 134 that may include a service execution environment 136. Each of the device handling layer 1 130 and the device handling layer 2 134 may be configured to manage the devices at the device level, for example the PEID 104 and the smart RFID reader 106. As discussed previously, the service execution environments 132 and 136 may each include a container, in which services may be executed in an adaptable and flexible manner. Thus, services may flexibly and adaptably be deployed and executed in each of the service execution environments 132 and 136. As shown in the example system 100 of FIG. 1, the service execution environments 132 and 136 may each include a connection manager 138 and 140, respectively. The connection managers 138 and 140, for example, may be configured to manage connections, for example, wireless connections, between the middleware 110 and the devices such as the PEID 104 and the smart RFID reader 106. Thus, if a connection is intermittent, for example, due to travel by a device, or due to noise interference in the signal, the connection managers 138 and 140 may be configured to attempt to maintain connectivity with the devices, even if the connection is intermittent, or to report breaks in connectivity to the application 108. Therefore, transmission of data from the devices may be sporadic.

As shown in FIG. 1, the service execution environments 132 and 136 may include services s3 142, s4 128, s8 144, and s9 146, which may be adaptively and flexibly located and executed on each of the device handling layers 130 and 134. Thus, for example, the service s5 126 a may be deployed to the PEID 104 to obtain a series of temperatures from the sensors 108 via the local data storage 120, and to calculate an average temperature value for a predetermined number of temperature values. The service s4 128 may be deployed to the device handling layer 1 130, for example, to obtain the resulting average temperature values from the PEID 104, and, for example, to calculate a slope for successive values. The service s3 142 may then obtain the resulting slope and compare the slope value to a predetermined threshold value and generate an alarm message to be sent to the request handling layer 150 if the slope value exceeds the threshold value. The processing may be achieved by initiating execution of the service s3 142, which may in turn initiate execution of the service s4 128, which may in turn initiate execution of the service s5 126 a, for example, via a service call mechanism that allows passing parameter values among the services. The pre-processed result values are returned by each of the services in succession by the ordering of execution of the called services.

Thus, a significant amount of pre-processing of the data from the sensors 118 may be performed, for example, first at the PEID 104 at the device level, and then at the device handling layer 1 130 in the middleware 110, thus easing the processing burden on the application 108 that may need to receive such alarm information regarding temperature levels of the product 102. Furthermore, by pre-processing the temperature values as an average value at the PEID 104, only the average value needs to be sent from the device layer to the middleware 110, thus significantly decreasing the amount of data sent from the device layer to the middleware layer 110, and on to the application 108 that may be located at a backend system.

The request handling layer 150 may include a request handler 152, a distribution manager 153, and a service manager 154. The request handler 152 may be configured to receive requests for information, for example, requests for analysis results related to PEIDs or other devices, from backend systems or other applications such as the application 108. In one aspect, the request handler 152 may operate as a request/response mechanism. However, the request handler 152 may be extended to provide subscriptions on information requests so that the requesting application 108 may receive subscribed information triggered, for example, by changes in values or in regular predefined intervals. For example, the application 108 may request analysis results regarding the temperature of the product 102 whenever the temperature fluctuates more than a predetermined amount, or every minute. For example, the application 108 may request an alert if the temperature of the product 102 increases more than 10 degrees in one minute or less.

The request handling layer 150 may include a request buffer 156 configured to store requests received from the application 108 and a result buffer 158 configured to store results from the request handler 152 for the application 108, for example, to enable communication to applications and PEIDs which have only intermittent connectivity. The requests from the application 108 may include at least a product identifier that identifies a specific product, for example, the product 102, and an InfoItemID value identifying the request and servicing required to satisfy the request. For example, if the application 108 requests an update on the temperature of an engine, for example, the product 102, then the request may include a product identifier for the product 102 and an InfoItem specifying, for example, a service such as “Current engine temperature.”

The service manager 154 may be configured to handle service tasks related to the management of services, which may include registering and unregistering of services, deploying services to other nodes, loading them into service execution environments, and support for service composition. The service manager 154 may communicate with a service repository 160 and service metadata storage 162, and a service injector (not shown) to accomplish these tasks.

The service repository 160 may be configured to store all available services that may be deployed and executed in the system 100, including, for example, an executable for each service. Additionally, a meta description of each service, including the hardware requirements and other properties, may be stored in the service metadata storage 162.

Composite services, which may include combinations of atomic services for application-specific purposes, may be stored in the service repository 160, as well. The service metadata storage 162 may maintain a list of InfoItems (e.g., information entities) that may be accessed from a PEID as identifying information or attribute information relating to the PEID (e.g., PEID 104). Such InfoItems, for example, may include simple information from a PEID such as a manufacturing date and total mileage of the product 102, or information that is derived by analysis, for example, average mileage per day or engine temperature trend during operation. The InfoItems provided, for example, by the PEID 104, may be retrieved from the PEID 104 when the product 102 is registered in the system 100. InfoItems that are derived from other information by pre-processing in the middleware 110 may be registered using administrative tools (not shown).

In some examples, the same service may be implemented for a plurality of development platforms, e.g., may be implemented for known development platforms that are based on the C/C++ programming language or the Java programming language. By providing such a diversity of development platforms, a given service may be deployable to a wider range or type of devices that may be in use. Information about the development platform(s) of the service in question may be included as a type of the service metadata 162, along with, for example, any of the various service requirements or preferences for operating the service

The service injector may be used to install and start deployed services (e.g., the service s5 126 a) on the SEE 122 of the PEID 104. The service injector, further, may more generally be used to manage a life cycle of the service(s), e.g., by performing service updates or stopping the service when necessary. Thus, one task of the service injector may include transferring concrete service code (e.g., an appropriate one of the service executable(s) of the service repository 160) to a selected device(s). Thus, the service injector receives and installs the kind of code in question. Such an install component as the service injector, although not shown in FIG. 1, may be installed on the device-side as either a single standalone software component, or may cooperate with other installation components in order to distribute the service executables of the service repository 160. In the latter case, for example, if the all selected devices for a requested service installation may not be reached, for example, due to a lapse in connection of a device, then, for example, a list may be maintained of currently unreachable devices that are intended to receive a service so that when they become reachable, the service injector may be alerted to accomplish the installation. After installing, for example, the service s5 126 a, the service s5 126 a may be kept in an inactive state until the service injector sends a start-up signal to change the service to an active state. In a similar way, the service injector may be used to organize the updating and stopping of services.

The service manager 154 may further include the distribution manager 153 that may be configured to determine valid distributions of requested component services, model the distributions, evaluate the distributions, and generate a recommendation of one or more of the distributions for mapping the requested component services onto service execution environments located on nodes in a network infrastructure. A model data storage 163 is configured to store representations or models of the network infrastructure, of service compositions, and load models to be used by the distribution manager 153 for determining, for example, potential distributions of the component services for mappings to service execution environments for execution.

The request handling layer 150 may further include device metadata storage 164 that includes information relating to devices, for example smart item devices such as the PEID 104 and the smart RFID reader 106 at the device layer and to devices at the device handling layers 130 and 134. Such information may include manufacturer information, manufacturing date, battery type, battery usage, battery cost, battery capacity, CPU type, CPU utilization, etc. that may be utilized, for example, by the service manager 154, in combination with the service.-metadata 162, in determinations for deployment of services from the service repository 160, for example, to service execution environments 122, 124, 132, 136, and a service execution environment (SEE) 166 that may, for example, receive deployed services s1 168 and s2 170 for execution at the request handling layer 150. The device metadata 164 may include, for example, a device description, a software description, a hardware description, and a device status. For example, the device description may include a device name, identifier, or type, or may include vendor information including a vendor name or vendor website. The software description may include an operating system description, including version and/or vendor, or may include a description of services running or allowed to run on the device platform. The hardware description may include information about attributes of a CPU of a device (e.g., name or speed), a memory of a device (e.g., total and/or free amount of memory), or connection capabilities (e.g., connection speed or connection type) of the device(s). The device status may include more volatile information, including a device location, current CPU usage, or remaining power or memory. Of course, other device aspects or information may be included in the device metadata 163, as would be apparent. For example, the device metadata 164 may include information about other devices, such as where the device 106 includes an RFID reader, and the device metadata 164 may include a description of types of RFID tags 114, 116 that may be read and/or written to by the smart RFID reader 106.

Further, the service metadata 162 may include a service behavior description, technical constraints of the service, or information regarding input, output, preconditions, or effects (IOPE) of the service. For example, technical constraints may include a required CPU type or speed, an amount of (free) memory that is needed, a type or speed of connection that is required or preferred, an operating system version/name/description, or a type or status of a battery or other device power source(s).

Thus, as with the device metadata 164, distinctions may be made between static and dynamic service requirements, such as hardware requirements. For example, a static value such as a total memory or maximum processing speed may be included, along with dynamic values such as available memory/processing/power and/or a number or type of other services that may be allowed to concurrently run on a device together with the service(s) in question, at an execution time of the service(s).

Construction and use of the service metadata 162 may differ depending on whether the service(s) are considered to be a compound (or composite) service and/or an atomic service. In this regard, an atomic service-may refer to a discrete service that runs on a single device, while a compound or, composite service may refer to a higher-level service that includes and combines one or more atomic services. For example, a compound service may be deployed in order to provide a cumulative or aggregated function(s), and an atomic service may refer to services that are deployed to individual devices 102, 106. For example, the product 102 may include temperature sensors 118 dispersed in a defined area to determine a temperature distribution or gradient in the area, in which case the PEID 104 may execute a temperature-collection service (e.g., the service s5 126 a on the PEID 104), while a compound service s4 128 at the device handling layer 1 130 may aggregate the temperature data of several devices and determine information about the temperature distribution or gradient. Thus, for example, it should be understood that part of the service metadata 162 for a compound or composite service may include information regarding atomic services that comprise the compound or composite service.

As another example, a composite service may include multiple component services. An initiation of execution of the composite service may include a call to the composite service, which may result in a call to one of the component services, which may result further in a call to another component service. Each of the services may receive and/or return parameter values, and the calls to the services may be initiated via an entry point of execution of the respective service. For example, the request handler 152 may receive a request from the application 108 for information relating to, for example, a product such as the product 102.

As an example, the product 102 may include an engine and the request may include a request for a notification whenever the engine temperature rises too fast. Thus, servicing the request may be fulfilled by executing a composite service “temperature monitor” which may include at least four component services such as:

-   -   (1) a data collector service configured to read from a         temperature sensor at a predetermined interval and generate a         time series;     -   (2) a trend service configured to receive the time series,         perform a linear regression on it, and return the slope;     -   (3) a threshold service configured to compare the slope to a         predetermined threshold, and return a value of true if the slope         exceeds the threshold and return a value of false otherwise; and     -   (4) a message service configured to generate a temperature         warning message that is sent as a result to the application 108,         if a value of true is returned by the threshold service.

Each of the component services may be implemented as lightweight, relocatable executables that may be easily deployed to various service execution environments for execution and interoperability with other services. Thus, for example, the data collector service may be configured as an executable and stored in the service repository 160 with corresponding descriptive metadata (e.g., description of functionality and input and output parameters) stored in the service metadata storage 162. Similarly, the trend service, the threshold service, and the message service may each be configured as an executable and stored in the service repository 160 with corresponding descriptive metadata (e.g., description of functionality and input and output parameters) stored in the service metadata storage 162. Further, the information describing the composite service “temperature monitor” may be stored in the service metadata storage 162, for example, the composite service name, indicators of the component services, and an indication of an ordering of execution of the component services to achieve the desired result of the processing.

Thus, as an example, the application 108 may send a request for a “temperature monitor” for the product 102 to the request handler 152. As discussed previously, the request may include information specific to the specified product 102, as well as an InfoItem identifying the requested service. If the product 102 is currently not connected to the middleware 110, as may be determined, for example, by the connection manager 138, the request may be stored in the request buffer 156 until the product 102 is connected. For example, the connection manager 138 may be sent a request to transmit a “connected” indicator to the request handler 152 when the product 102 is connected to the device handling layer 1 130.

When it is determined that the product 102 is connected, the request handler 152 may send the “temperature monitor” request to the service manager 154, which may access the service metadata 162 to obtain information regarding the composite service “temperature monitor.” The service manager 154 may determine that the composite service includes at least four component services s5 126 (e.g., the data collector service), s4 128 (e.g., the trend service), s3 142 (e.g., the threshold service), and s2 170 (e.g., the message service), wherein an executable for each service may be included in the service repository 160 and associated metadata may be included in the service metadata 162. Based on the composite service metadata, the service manager 154 may further determine an entry point for processing, and an ordering of execution and processing of data for the component services s5 126, s4 128, s3 142, and s2 128, as well as information relating to the parameters utilized in executing the services and passing and returning items.

The service manager 154 may then access the device metadata 164 to obtain device information to determine how much of the component service processing may be deployed and executed, for example, at the product 102 (e.g., at the SEE 122). Since the example ordering of execution may indicate that service s5 126 needs to be performed to process the data from the sensors 118 before the service s4 128 may process a result of that processing, the service manager 154 may determine that the component service s5 126 a may be deployed to the SEE 122 for execution at the product 102 (e.g., an engine needing temperature monitoring). As the service s4 128 would conveniently reduce the further transmission of data to the application 108, as well as, for example, reducing the amount of processing of data at the backend system of the application 108, the service manager 154 may determine, based on the service metadata 162 and the device metadata 164, whether the service s4 128 may also be deployed and executed at the product 102.

If the SEE 122 may not conveniently accommodate the service s4 128, then the service manager 154 may determine, for example, that the SEE 132 of the device handling layer 1 130 may be used for deployment and execution of the next (e.g., by execution ordering) services s4 128 and s3 142. The service manager may then determine that the service s2 170 may be deployed and executed at the SEE 166 at the request handling layer 150, such that the request manager 152 may initiate execution of the composite service by initiating execution at an entry point located in the service s2 170, for example, resulting in a call from the service s2 170 to the threshold service (e.g., s3 142), such that, if the threshold service (e.g., s3 142) returns a result of true, then the service s2 170 may generate a temperature warning message to be returned to the application 108. As deployed, the services s5 126 a, s4 128, s3 142, and s2 170 may then enable pre-processing of the raw data of the sensors 118 at the device level, with a pre-processed result to be returned to the middleware layer 110 for further processing, with a single analysis result of that processing (e.g., a warning message) returned to the application 108. Thus, a significant decrease in transmission and processing of data is achieved at the application 108 level, with more processing achieved at the lower levels such as the device layer and the middleware layer 110. Moreover, the component services may be implemented as lightweight, reusable, and relocatable services that may be dynamically deployed and relocated as conditions change in the system 100.

Furthermore, the service metadata 162 may include a list of the component services s2 170, s3 142, s4 128, and s5 126 associated with an InfoItem associated with the composite service “temperature monitor,” and metadata for each of the component services s2 170, s3 142, s4 128, and s5 126, which may be stored in the service repository 162 with executables for each of the component services, may include information regarding entry points for each of the component services, as well as information regarding parameters that may be expected to be passed in to each component service or returned as a result of execution of the component services. For example, the service s4 128, which may include the trend service discussed previously, may have associated with it a service executable and metadata indicating that the service s4 128 inputs a parameter including a time series, and outputs a parameter including a slope that results from executing a linear regression on the slope.

FIG. 2 is a block diagram illustrating an example composition of services 200. As discussed previously, a composite service may include multiple component services, such that the composite service may be initiated by a call including an initiation of execution of instructions at a defined entry point of the composite service. The call to the composite service may include a transmission of indicators of parameters and/or parameter values to enable exchange of data and results among the services. The component services may be installed. The component services may have an ordering defined by an ordering of execution of the services as discussed previously, for example, with regard to the composite service “temperature monitor.” As shown in FIG. 2, the component service s3 142 (e.g., the threshold service) may initiate execution of the component service s4 128 (e.g., the trend service), which may initiate execution of the component service s5 126 a (e.g., the data collector service), which, for example, may be deployed to the SEE 122 of the PEID 104 at the device level in order to reduce the amount of data transmitted to the backend system of the application 108, as well as to reduce the amount of processing of data at the backend system.

Further, the component service s5 126 a may return a result of its data collector processing (e.g., a time series) to the component service s4 128, which, for example, may be deployed to the SEE 132 of the device handling layer 1 130 of the middleware layer 110. The component service s4 128 may then return a result of its trend processing on the time series (e.g., a slope) to the component service s3 142, which, for example, may also be deployed to the SEE 132 of the device handling layer 1 130 of the middleware layer 110. The component service s3 142 may return a result of its threshold processing on the slope (e.g., a boolean value of true or false) to a service that may have called the component service s3 142, for example, the service s2 170 (e.g., a message service), which may be deployed to the SEE 166 at the request handling layer 150, to return a warning or no message in response to a call to the composite service “temperature monitor.” This analysis result may then be placed in the result buffer 158 by the request handler 152, and the application 108 may be informed of its availability for retrieval from the result buffer 158.

Thus, the request for the analysis result may, for example, be decomposed into a deployment of component services, placed according to their ordering of execution such that processing of raw data is performed at the device level, or close to the device level, with intermediate results to be processed by passing pre-processed results up from the device layer to the middleware 110, via device handling layers 130, 134, and on up to the request handling layer 150. Thus, the processing of the raw data of the sensors 118 may be started at the edge devices (e.g., PEID 104), with progressively further pre-processing of intermediate results performed at service execution environments up through the layers until the application 108 is enabled to receive an analysis result that is potentially fully processed for use, for example, in product lifecycle management.

It is to be understood that while each of the services s3 142, s4 128, and s5 126 is illustrated in FIG. 2 as communicating only with a single called component service, any of the services may call more than one called service (i.e., one-to-many), and, in other examples, multiple component services may also call a single service (i.e., many-to-one).

FIG. 3 is a block diagram illustrating an example infrastructure view 300 of an example embodiment of the system 100 of FIG. 1. A device handler, for example, the device handling layer 1 130, may include a device-specific part of the middleware 110 that may handle device detection and access. The device handling layer 1 130 may notify the request handling layer 150 upon detecting PEIDs, and may translate and execute the received requests in the PEID-specific protocol. Network or infrastructure nodes that include functionality of a device handler may be considered as access points for PEIDs that may be located nearby the smart item, e.g. in a garage, a depot, a warehouse, etc. Depending on the application scenario there may exist a number of device handler nodes, potentially supporting different PEID protocols. A device handler, for example, the device handling layer 1 130, may be connected to a request handler, for example, located at the request handling layer 150, via one or more high-capacity network connections, e.g. via a LAN or WAN.

A request handler located at the request handling layer 150 may include a device-independent part of the middleware which may manage incoming requests from backend applications. As discussed previously, the request handler 152 may store the incoming requests, for example, in the request buffer 156, until a PEID becomes available on the network, and may deliver the request to a device handler node to which the PEID may be connected. As the request handler 152 may include the main entry point for backend applications, the request handler 152 may be physically located nearby the backend systems.

An example scenario may include maintenance planning for trucks. Data on the operational state of a vehicle such as a truck may be collected by a PEID, for example, PEID 104, which may be embedded on a truck. The data may be transmitted to a base station upon request from a maintenance application, for example, included in application 108, in the backend. An example device handler may be located in a depot and may be connected to a request handler node located in a data center, which may accept requests from the application 108 and may notify the application 108 when a result is available, for example, in the result buffer 158. In a more complex scenario, there may be multiple device handler nodes at different locations. The PEID 104 may include an embedded system in the vehicle, e.g. an on-board computer. The PEID 104 may include multiple data sources, such as counters and attached sensors such as the sensors 118. The data sources may include, for example, sensors or counters for measuring mileage, engine temperature, revolutions per minute (RPM) or speed, and oil pressure of the vehicle, as shown in the example of FIG. 3.

In order to obtain a comprehensive view of the vehicle's operational status, the application 108 may request 1) current mileage; 2) engine speed, represented as a distribution of time into categories slow, medium, fast; 3) an indication of whether engine temperature remained within a given limit; and 4) trend and min/max of oil pressure.

As discussed previously, within the middleware 110, the service repository 160 may provide component services which can be flexibly arranged in compositions to handle new requirements. For the example truck fleet scenario discussed above, compositions including generic component services for data analysis may be employed. FIG. 4 is a block diagram illustrating an example composition 400 including generic component services, such as, for example, aggregation 402, linear regression 404, min/max 406, classification 408, and threshold 410. Their class limits, thresholds etc. may be set with configuration parameters that may become part of the composition description, which may be stored, for example, in the service metadata 162.

The generic component services may require input data to be provided in a common format. As every PEID may supply its data differently, a set of PEID-specific component services may be used to convert the data representation from the PEID into a required common format. The conversion may be performed, for example, by component services FormatOP 412, FormatRPM 414, and FormatET 416.

A data buffer component service, for example, data buffer 1 418, data buffer 2 420, or data buffer 3 422, may be used to buffer sensor data between the invocations of the component composition 400. The example aggregation component service 402 may collect the partial results of the component services and the mileage data and combine them into a final result, which may be returned to the application 108, for example, as an operational status result.

A suitable distribution may thus need to be determined for deploying these component services to the infrastructure 300. A distribution may include, for example, a set of component placements, in which every component service may be assigned to a node in the infrastructure 300. The number of possible mappings (e.g., combinations) of component services to nodes, and the number of factors influencing the quality of a distribution may contribute to the complexity of identifying good distributions.

For an infrastructure including N nodes and a composition including C component services there may be N^(C) distributions to consider. For example, if N=3 and C=11, there may exist 3¹¹=177,147 possible combinations. However, a subset of these combinations may be invalid due to violations of constraints. The remaining set of valid distributions may thus be evaluated in terms of quality to identify the most suitable distributions. With regard to the selection and evaluation of valid distributions, resource constraints, resource demands, and performance measures may be considered.

For example, various nodes of a network may have different hardware capacities. Such resource constraints may rule out certain distributions, for example, if the memory on a node is insufficient to hold all component services that are assigned to it, or if the bitrate capacity of a network connection is too low to handle an amount of data to be transmitted.

Further, component services included in a component composition may place certain resource demands on the infrastructure 300. These demands may vary among the component services, and may be dependent on other factors. For example, the bitrate requirements for a particular component composition may depend on both the load and the input/output ratio of each component service.

Moreover, the performance of every distribution may be considered, for example, in terms of response time and throughput. Similar to resource demands, there may be a demand for performance, which may, for example, include a maximum response time allowed. An example number of influencing factors (IF) for a given case may be determined as follows:

IF=NR _(n) +L _(n) +CD _(c) +L _(c) +S+1.

In the equation for IF shown above, N indicates the number of nodes included in the infrastructure, R_(n) the number of resource types per node, L_(n) the number of network links (with only one resource), C the number of component services, and D_(c) the number of demand types per component. L_(c) denotes the number of component dependencies that carry bitrate demands, and S denotes the number of data sources. The trailing 1 denotes an example influencing factor “invocations per hour” from an example load model.

Related to the example with N=3 and C=11, there may be two resource restrictions per node, one resource restriction per network connection, for each component service there may be at least two resource demands, plus the demands for each connection between the component services. In total, for the example, there may be 51 factors to consider. For all 177,147 combinations, distributions with constraint violations may be eliminated, and the remaining distributions may be evaluated in terms of resource consumption and performance.

Thus, an example component service deployment planning decision may be complex due to 1) a large number of possible combinations of component services and nodes; 2) resource restrictions that may be very different among the nodes and network connections; 3) resource demands that may vary by component service and may be partly load-dependent; and 4) complex performance estimation due to its dependency on the distribution, the load model, and the characteristics of both component services and infrastructure.

While manual planning of the component deployment may be possible with simple cases, it may not be reasonable for real-world scenarios. When components or component compositions are deployed onto network nodes, at least two goals may be considered: either that deployment is optimized for performance, or to fulfill restrictions caused by resource dependencies. The first goal may include ensuring performance requirements such as response time and throughput. The second goal may rely on features of a technical environment, such as operating systems, execution environments, database connections, requirements for memory, etc.

However, as discussed previously, in smart item environments, a standard execution environment such as OSGi may be installed on all nodes including the smart item. Thus, components compliant to the environment may be run on every node in a network or infrastructure. As discussed previously, resources may be scarce, especially near the edges of the network. However, a goal of saving resources may need to be balanced with performance requirements to provision requested data in reasonable time.

An example deployment planning method for component services in smart item environments may include: 1) consideration of resource restrictions for every node and network connection; 2) consideration of different loads; 3) evaluation of resource demands, for example, memory, network bitrate, CPU, and energy; 4) evaluation of performance, for example, response time and throughput; and 5) integration of performance and resource consumption into a single measure for comparison and ranking of distributions.

Planning of component service deployment may become a complex task based on a large number of possible component placements, and factors that may influence the quality of a distribution. If decisions for component placement are supported by a structured method, the complexity of the task may be reduced, as well as the time that is needed for deployment planning. An example solution may thus evaluate component distributions with special regard to the specifics of smart item environments, particularly with regard to heterogeneous nodes and network connections, and different load parameters.

An example technique for component deployment planning may include a decision support tool, for example, to be used interactively. A user, for example, an administrator, may select models for infrastructure and component service composition, as well as a load model and a maximum running time. The example technique may, for example, provide a number of recommendations for good distributions, from which the user may select one to start the actual deployment process. Alternatively, the example technique may be re-run with different parameter settings.

As shown in FIG. 5, an example technique 500 for component deployment planning may include three elements: modeling 502, evaluation 504, and recommendation 506. For example, modeling 502 may describe a representation of the infrastructure, for example, the infrastructure 300, and the composition, for example, the composition 400. Evaluation 504 may calculate a quality measure, or score, for a given distribution, for example, based on a load model 506 and a cost of resources 508. Recommendation 506 may include generating possible distributions, maintaining the distributions with best results in a list. A score indicating an overall cost of utilized resources (OCUR) may be used as a quality measure for distributions. The score may be calculated, for example, by summing resource consumptions, each weighted by a cost factor. A mapping of the component services to the nodes may be performed, for example, by the distribution manager 153 based on assignments 510 resulting from the recommendation 506 of distributions of the component services.

As discussed previously, modeling 502 may be used to describe the infrastructure as well as the component composition, which may both be represented as annotated graphs. Additionally, a load model may express an expected load. For example, FIG. 6 depicts an example undirected graph 600 describing an example infrastructure. Although not shown for every node, each node in the graph of FIG. 6 may be annotated by a set of example properties, as described in Table I shown below. In FIG. 6, a node 1 602 includes a data sink. As shown, the node 1 602 may, for example, be located in the request handling layer 150 of FIG. 3.

A node 2 604 may be associated with a set of node properties 606, which may indicate, for example, a memory capacity and a CPU capacity that is available for component services that may be mapped to the node 2 604. A node 3 608 may be connected to the node 1 602 via an edge, which may be associated with a set of connection properties, which may indicate, for example, a bitrate associated with the connection. For the example of FIG. 6, it is noted that resources specified in the infrastructure model may indicate capacities which are actually available for component services, and not the general hardware equipment of a node. The node 2 604 may be located in the device handling layer 130 of FIG. 3.

A node 4 612 may include a data source 1 and a data source 2, which may include, for example, sensors such as the sensors 118 of FIG. 1 The node 4 612 may, for example, be located at the PEID 104 of FIG. 3.

TABLE I EXAMPLE PROPERTIES OF INFRASTRUCTURE GRAPH ELEMENTS Property Applies to Description ID Node String identifier AVAILMEM Node Indicates an amount of memory that is available on this node (in KB) MEMCOST Node Cost for a consumed unit of memory on this node (expressed as weight) AVAILCPU Node Indicates the CPU power that is available on this node NODELOAD Node Stores the sum of incoming data (in KB/s) for infrastructure nodes AVAILBITRATE Edge Specifies the available bitrate of the represented network link (in KB/s) BITRATECOST Edge Cost for a consumed unit of bitrate on this edge (expressed as weight)

Although data sources and sinks are shown as part of the example infrastructure of FIG. 6, they may not be not represented as nodes in the example infrastructure graph 600. As data sources and sinks may not be moved to other infrastructure nodes, they may be modeled using static assignments. Static assignments may include nodes of the component graph, which may be assigned to a node of the infrastructure and may not be considered in the generation of distribution variants. Static assignments may thus be used for data sources and the data sink, and may also be used for user-defined assignment of components, i.e., the user may manually assign components to nodes. Static assignments may be represented as a set A_(s) of tuples A_(ij)=(C_(i), N_(j)), where C_(i) denotes an element from the set of component services, and N_(j) denotes an element from the set of infrastructure nodes.

As another example, FIG. 7 depicts an example component service composition 700 represented as a directed acyclic graph, whereby the edges point in the direction of invocation of example component services c1 702, c2 704, and c3 706 of the composition 700. In other words, the edges may denote which component services a particular component service depends upon, e.g., as data input or for providing a particular functionality. Data sources and sinks may also be included in the component graph, if component services depend on them. Similar to the infrastructure graph 600, the nodes of the component composition 700 graph may be annotated with properties such as component properties 708, for example, memory, CPU, and GAIN, as shown in Table II below. For example, properties REQUIREDBITRATE (e.g., for edges) and COMPONENTLOAD (e.g., for nodes) may be assigned when bitrate demands are calculated. This calculation may be performed in the evaluation step 504 of FIG. 5, and may use an example GAIN property of component services, as shown in Table II.

TABLE II EXAMPLE PROPERTIES OF COMPONENT GRAPH ELEMENTS Property Applies to Description ID Node String identifier NODE TYPE Node Either Component, Data Source, or Data Sink REQUIREDMEM Node Specifies the amount of memory this component requires on a node (in KB) REQUIREDCPU Node Specifies the CPU power required for an invocation of this component GAIN Node The ratio of data input to data output when this component is invoked (float) COMPONENTLOAD Node Stores the total rate of ingoing data rates (in KB/s) for a component, does not apply for data sources and sink REQUIREDBITRATE Edge Stores the bitrate demand for this edge (in KB/s)

An example load model may include a number of invocations per hour, and the message sizes for every data source in the infrastructure. As the acquisition of monitoring data from products may be performed in scheduled intervals, this example load model may be sufficient. However, the load model may also be extended to statistically distributed invocations.

In the example evaluation, a score for a given distribution may be calculated. Distributions may be represented, similarly to static assignments, as (component, node) tuples. Before an actual evaluation is performed, dynamic resource demands may be calculated. Afterwards, the resource demands may be assigned to the infrastructure and compared to the resource constraints. The consumed resources may then be evaluated to calculate the distribution's score.

To evaluate a distribution, an example quality measure may be defined which may facilitate comparisons of different distribution variants. For example, resource consumption may be particularly considered. However, the resource consumption of a component composition may depend only on the load model and may not change with different component placements. Moreover, a quality of a distribution may depend on the actual placement of components, and thus, the assessment of resource consumption alone may not be sufficient.

An example goal may include saving resources on infrastructure elements, where the resources may be particularly scarce. To incorporate this principle into an example quality measure, costs may be assigned to weight the utilization of different resources at individual nodes and edges of the infrastructure. For example, a megabyte of memory may be expressed as being much more expensive on an embedded system, for example, on the PEID 104, compared to a middleware node, for example, a node included in the device handling layer 1 130.

A similar type of weighting may be applied to network links, as the same amount of data transmitted over a GPRS connection between a PEID and a device handler, for example, between the PEID 104 and the device handling layer 1 130, may incur higher costs than on a LAN connection between a device handler and a request handler, for example, between the device handling layer 1 130 and the request handling layer 150. Costs may be assigned to every resource, for example, by a user and may represent the “exchange rates” between different resources. Thus, the user may indicate at which rate the user is willing to invest more CPU power for data processing to decrease the bitrate demand, as pre-processed data may be smaller than its corresponding raw data.

Resource consumption costs, for example, may be integrated with performance measures. Performance may mainly relate to response time, for example, a length of time required to complete an invocation of a component composition. If time is considered as a resource, then it may be integrated with the cost of resource consumption. A cost may also be assigned to response time to specify the weight of this factor in relation to resource consumption. Thus, an example “overall cost of utilized resources” (OCUR) may be calculated in accordance with equation 1:

$\begin{matrix} {{OCUR} = {{\sum\limits_{i = 1}^{N}{\sum\limits_{k = 1}^{R_{i}}{{n_{i}(k)}{C_{i}(k)}}}} + {\sum\limits_{< {ij} >}{n_{ij}C_{ij}}} + {t_{R}C_{R}}}} & (1) \end{matrix}$

wherein

-   -   N indicates a number of nodes,     -   R_(i) indicates a number of resource types on each node i,     -   n_(i)(k) indicates a resource consumption for resource k on node         i,     -   C_(i)(k) indicates a cost or weight of resource k on node i,     -   n_(ij) indicates a resource consumption on an edge between nodes         i and j,     -   C_(ij) indicates a related resource cost or weight,     -   t_(R) indicates a response time, and     -   C_(R) indicates a cost or weight of the response time t_(R).

It is noted that the calculation of resource consumption costs as shown above may be handled separately for nodes and edges.

Resource demands may, for example, be distinguished into load-independent and load-dependent demands. For the example shown above, the only independent demand is memory, as every component service requires a specified amount of memory on a node. An example load-dependent resource demand may include the bitrate demand, which denotes the amount of data per unit of time that may be transferred between components. To calculate bitrate demands, an example recursive Algorithm 1, as shown below, may traverse the component graph, for example, the component graph 700 of FIG. 7, from the data sink to the data sources. The example algorithm may multiply (step 14) an incoming data load with an input/output ratio (e.g., GAIN) to determine the loads on every edge based on the load model and may store each load in a property map associated that edge and included in the component graph (step 13), as described in example Algorithm 1 (calculateBitrateDemands( )) below.

Algorithm 1: calculateBitrateDemands (startComp) Require: startComp ≠ 0 1: timeFactor

invocationsPerHour ÷ 3600 2: while startComp has more edges do 3:  e

nextEdge 4:  inputComp

e.opposite(startComp) 5:  if NODETYPE of inputComp is component then 6:   load = calculateBitrateDemands(inputComp) 7:  else if NODETYPE of inputComp is datasource then 8:   load

inputComp.messageSize 9:   e.REQUIRED_BITRATE

load × timeFactor 10:  end if 11:  sumLoad

sumLoad + load 12: end while 13: startComp.COMPONENT_LOAD

sumLoad 14: return sumLoad × startComp.GAIN

Once all resource demands are known, they may be assigned to the infrastructure graph, as shown below, for example, by an example evaluation Algorithm 2. The example Algorithm 2 may traverse through all elements (i.e., nodes and edges) of the infrastructure graph, for example, the infrastructure graph 600 of FIG. 6, comparing the sum of already assigned demand and new demand for all resources to their respective available capacity (steps 3-7).

If the new combined demand is still less than the capacity, the new combined demand may be assigned to the respective element (step 11). As a single constraint violation may render the whole distribution impossible to realize, further analysis of the distribution may be a waste of computation time (steps 7-9). Thus, the loop for demand assignments may be terminated and the current distribution may be discarded by returning an example result value of −1 (step 16). If all resource demands are assigned without violation of constraints, the distribution may be considered valid. In this case, the example quality measure OCUR (e.g., equation 1) may be calculated as a score and may be returned as a result (steps 18-19).

Algorithm 2: evaluate( ) Require: all resource demands are specified or calculated 1: error

false 2: for all resource types rt do 3:  for all infrastructure elements ie do 4:   max

ie.maximumCapacity 5:   curDmd

ie.currentDemand 6:   newDmd

rt.getDemand(ie) 7:   if (curDmd + newDmd) > max then 8:    error

true 9:    exit for-loop 10:   else 11:    ie.currentDemand

(curDmd + newDmd) 12:   end if 13:  end for 14: end for 15: if error then 16:  return −1 17: else 18:  score

calcScore( ) 19:  return score 20: end if

In order to determine recommendable distributions, a number of distributions may be generated and evaluated. An example goal may include determining valid distributions whose OCUR value is as small as possible, as a small OCUR value may indicate a distribution having low costs of utilized resources and therefore may indicate a good distribution. For example, Algorithm 3 (identifyGoodDistributions( )) shown below depicts an example algorithm for identifying recommendable, or “good” distributions based on a small OCUR value.

For the example of Algorithm 3, a maximum running time of the algorithm may be limited to maxTime. The bitrate requirements may be calculated (step 2), for example, based on Algorithm 1 as shown above. A distribution candidate may then be generated (step 4) and evaluated (step 5). If a score, for example, an OCUR value determined for the distribution candidate is lower than a previous best score (step 6), the distribution candidate may be stored at a variable bestDistr (steps 7-8). According to an example embodiment, a “top list” of three to five distribution variants may be maintained. The generation and evaluation of distributions may be repeated until either the running time exceeds maxTime or there are no more distribution candidates (step 3).

Algorithm 3: identifyGoodDistributions( ) Require: maxTime > 0 1: startTime

currentTime 2: calculateBitrateDemands(datasink) 3: while moreDistrAvailable and      (currentTime − startTime) ≦ maxTime do 4:  curDistr

getNextDistribution( ) 5:  score

evaluate(curDistr) 6:  if score < bestScore and score > −1 then 7:   bestScore

score 8:   bestDistr

curDistr 9:  endif 10:  output(bestDistr) 11: end while

It is noted that the example Algorithm 3 shown above does not make any assumptions on how the distribution candidates are generated. Any strategy from random assignments to pre-evaluations and sophisticated heuristics may be used. In an example embodiment, both random assignments of components to nodes as well as exhaustive enumeration may be supported. Further, the example Algorithm 3 shown above is merely intended to illustrate an example identification of a recommended distribution, and one skilled in the art will recognize that many such algorithms may be used to determine recommendations for distributions without departing from the spirit of the present discussion.

An example embodiment may generate recommendations for distributions and may consider bitrate and memory as resource types. The achievable quality under a restricted runtime may be attained by using both random generation of variants as well as exhaustive enumeration.

FIG. 8 is a flowchart illustrating example operations of the system of FIG. 1. Specifically, FIG. 8 is a flowchart illustrating an example determination of a recommendation for mapping components of a composite service for processing requests from the application 108 of the system 100.

In the example of FIG. 8, one or more distributions, to service execution environments, of component services associated with a composite service associated with an analysis of data generated by one or more sensors, may be determined, the composite service including an ordering of execution of the associated component services for the analysis of the data, at least one of the service execution environments located at a first network node associated with a device layer and at least one other one of the service execution environments located at a second network node associated with a device handling layer (802). For example, the composite service “aggregation” may be determined to include at least ten component services as discussed previously with regard to FIG. 4. For example, the distribution manager 153 may access the service metadata 162 to determine a list of the component services associated with the composite service associated with an InfoItem, for example, component services linear regression 404, min/max 406, classification 408, threshold 410, FormatOP 412, FormatRPM 414, FormatET 416, data buffer 1 418, data buffer 2 420, and data buffer 3 422. The distribution manager 153 may access the service repository 160 to obtain, for each of the component services, metadata indicating, for example, the ordering of execution of the component services, entry points for execution of each of the component services, and information regarding parameters to be passed among the component services.

If it is desired to implement “aggregation” with regard to, for example, a vehicle housing the PEID 104, the distribution manager 153 may also access the device metadata 164 to obtain information regarding, for example, the PEID 104, as well as the SEE 122 and the local data storage 120. After analysis of service metadata 162 and device metadata 164 associated with the PEID 104, the distribution manager 153 may further access the device metadata 164 for information regarding the device handling layer 1 130 and the SEE 166 to determine potential distributions of the component services linear regression 404, min/max 406, classification 408, threshold 410, FormatOP 412, FormatRPM 414, FormatET 416, data buffer 1 418, data buffer 2 420, and data buffer 3 422.

An evaluation of each of the distributions of the component services may be determined based on a metric associating one or more weighted values with a consumption by the each distribution of one or more respective resources associated with each of the first and second network nodes (804). For example, each candidate distribution may first be determined to be valid, and a load model may be determined. For example, an example infrastructure may be modeled as discussed with regard to FIG. 6. Further, for example, the composition of component services may be modeled as discussed with regard to FIG. 7.

The resource demands may then be determined, for example, as described with regard to Algorithm 1 and Algorithm 2, for example, based on the OCUR score of equation 1 discussed previously.

The distribution manager 153 may then determine a recommendation including one or more of the distributions based on the evaluation (806). The recommendation may be determined, for example, as described with regard to Algorithm 3 as discussed previously. If the recommendation includes more than one distribution, a “best” distribution may be selected from the recommendation, and the service manager 154 may then deploy the component services according to the selected distribution, and may initiate execution, as described below.

Thus, the pre-processing may be flexibly and dynamically distributed via lightweight component service executables such that, for example, the raw data generated by the sensors 118 may be pre-processed at the device level, with less data needing to be transmitted from the PEID 102, as well as including further processing of the data in the device handling layer of the middleware, before intermediate results are passed up to the request handling layer 150, with a fully processed result returned to the backend application 108. The dynamic distribution may be determined via a weighted or cost-based technique, for example, to ensure acceptable levels of performance of the distribution.

FIG. 9 is a flowchart illustrating example operations of the system of FIG. 1 for product lifecycle management. Two example scenarios for an application to access data from PEIDs using middleware may include a request/response scenario and a subscription scenario. In the request/response scenario, for example, a single request may be received, and a single result may be returned, whereas in the subscription scenario, a request may be ongoing. For example, a subscription request may request a response upon the occurrence of a triggering event, such as, for example, detection of a sudden spike in temperature of a product, or a request for data regarding the state of a product to be transmitted every five minutes.

FIG. 9 illustrates example operations of the system of FIG. 1 for product lifecycle management according to a request/response scenario. Thus, a request may be received from an application via a request buffer for information associated with a specified product (902). For example, as discussed previously, the application 108 may place a request in which the information relating to the product 102 (e.g., manufacturing date, serial number, operational status, etc.) and an identifier of the product 102 may be specified, into the request buffer 156. Optionally, an expiration time interval may be specified, after which the request may be timed-out.

A determination may be made whether the product, e.g., the product 102 may be connected to the network (904). For example, the connection manager 138 may be queried to determine whether the product 102 is currently connected. If the specified product is not connected to the network, the request may be buffered (906), e.g., via the request buffer 156.

If the specified product is connected to the network, it may be determined, based on the device metadata 164 and the service metadata 162, for example, whether the requested information is directly available on a PEID, for example, the PEID 104 (908).

If not, a service description may be retrieved from the service repository, e.g., the service repository 160 (910), as the requested information may require data processing using data processing components. As discussed previously, the service description may include, for example, which atomic components, or component services, are included in the composite service. The description may also include an entry point for the service, for example, an entry point for the component service of the composite service that is to be called first, and various parameter settings for the involved component services, for example, thresholds, class limits, sampling frequencies, buffer capacities, etc.

The composite service may then be invoked based on the entry point (912), for example, by the request handler 152. As discussed previously, if the invoked component service is dependent on other components, those components may be called subsequently. Thus, a component service may be called (914). Step (914) may be repeated until a called component service depends on external input (916) such as a sensor value (e.g., from sensors 118), a counter value stored on the product 102, or any other data from the product 102.

The requested raw data may be retrieved from the product 102 and returned to the requestor (918), which may be the request handler 152 or a calling component service. Step (918) is performed if the requested information is directly available on the PEID at step (908).

If the requestor is a calling component service (920), the retrieved data may be processed and returned to the caller (922). Step (922) is repeated until the entry point of the composition is reached (924).

When the entry point of the composition is reached (924), or if the requestor is not a calling component service at step (920), the requested result, for example, the analysis result, may be received, for example, by the request handler 152, and maybe stored in the result buffer (926), for example, the result buffer 158. The requesting application, for example, the application 108, may be notified that the requested result, for example the analysis result, is in the result buffer (928), for example the result buffer 158. The request, for example, the request for the analysis result, may then be deleted from the request buffer (930), for example, the request buffer 156.

As a further example of identifying a suitable distribution for the example scenario involving the fleet of trucks, the required parameters may be assigned as in the models discussed previously with regard to FIGS. 3-7. Table III as shown below illustrates an example overview of capacities and costs in the example infrastructure 300, and table IV illustrates example demands of example component services, for example the example component services as discussed with regard to FIG. 4.

TABLE III EXAMPLE COSTS AND CAPACITIES OF THE INFRASTRUCTURE Available Memory Node Memory Cost PEID  2048 KB 15 Device Handler 20480 KB 3 Request Handler 51200 KB 2 Bitrate Link Available Bitrate Cost PEID - Device Handler   8 KB/s 60 Device Handler - Request Handler 8192 KB/s 15

TABLE IV EXAMPLE DEMANDS OF COMPONENT SERVICES Memory Component demand Gain Aggregate 200 1.1 Linear Regression 120 0.05 Min/Max 30 0.05 Classification 300 0.2 Threshold 150 0.05 FormatOP 200 1.4 FormatRPM 220 1.5 FormatET 200 1.4 Data Buffer 1 50 1.0 Data Buffer 2 50 1.0 Data Buffer 3 50 1.0

As an example, assuming that an operational status may be requested twice per hour, for example, by the application 108, an example distribution may be determined by using exhaustive enumeration and setting maxTime to 10 minutes. For invocationsperhour=2, an example result as shown in FIG. 10 may be obtained.

An OCUR value of the example distribution shown in FIG. 10 is 3151, and there is not a single invalid distribution. All components of the example are assigned to a node located in the request handling layer 150. The load for this example is so low that components are placed on the node with the cheapest resources, which is also the node that includes the data sink.

If, for example, the truck driver reports some technical problems, a decision may be made to request that the application check the vehicle's operational status more often, for example, it may now be requested every minute. The sampling frequency of all sensors may be increased accordingly to obtain more detailed results, and to allow for early identification of problems to prevent damage. If the distribution manager 153 is run with invocationsperhour=60 to recommend distributions, the distribution manager 153 may recommend an example distribution as shown in FIG. 11.

In this example case, the distribution's OCUR value is approximately 8,750, and approximately 174,676 distributions may be determined to be invalid (e.g., approximately 98.6%). Due to the higher load, some components may be assigned to the PEID 104. Thus, data may be processed early and may reduce the amount of data to be transmitted over the network connection between the PEID 104 and a device handler node located in the request handling layer 150.

When only limited time may be available, or the number of combinations may be large, a complete evaluation of all possible distributions may not be feasible. In an example embodiment, the execution time may be limited. The generated result may thus include the best distribution that may be found within the given amount of time. This example embodiment may test which results are achievable when only a fraction of all possible distributions are evaluated. To this end, the example scenario may be evaluated with time restriction using both “random” and “exhaustive enumeration” strategies.

While the previous discussion of example embodiments has not explicitly included evaluation of CPU loads and calculation of response times, as an example, it is noted that CPU requirements may be expressed as a single number which may then be compared to the capacity. Another example technique may use a linear function to express CPU usage, for example, depending on the requests per second. Such techniques might work well, for example, within environments wherein nodes have similar CPU power, such as in grid environments.

In smart item environments, an example CPU of an example middleware node might be, for example, 20 times more powerful than a CPU of an example PEID, which may cause difficulty in expressing the CPU demand per invocation of the component service. Therefore, the CPU demand of a component service for processing a given data amount may be expressed as a percentage of CPU capacity on a reference environment. The CPU capacity of every infrastructure node may then be expressed as a ratio to the CPU power of the reference environment. With this ratio and the component's reference CPU demand the actual CPU demand may be determined for a given amount of data to be processed.

An example response time for an invocation may be determined as the sum of partial times for processing, transmission, and queuing. Methods for determining response times are known in the field of performance analysis. For example, network calculus may be used to calculate delays.

The example deployment planning methods for components described herein have been specifically discussed with regard to distributed components in smart item environments. These networks are characterized by a high degree of heterogeneity in terms of available hardware resources. Furthermore, there may exist a danger, for example, of overloading the system by large amounts of data which are transmitted from smart items to backend systems. The example deployment planning techniques described herein use cost-based resource consumption assessment to determine a good distribution of components. This example approach may include expressing substitution rates of different resources, including response time.

Thus, using techniques described herein, sensor data or smart device data, for example, may be processed on its way through the network, with appropriate utilization of available computing power and network bandwidth. In other words, the processing of data may be placed as close as possible to the data source with consideration of hardware restrictions of PEIDs at the edges of the network, which may thus reduce the amount of data effectively before it is passed on to a consuming backend application.

Besides the reduction of large amounts of data transfer and storage, another benefit may include the flexible analysis of data for different application scenarios that may exist, for example, in systems involving product lifecycle management. However, the system discussed herein is not restricted to product lifecycle management, as the system may be applicable to other examples such as supply chain management, or home automation. Generally, the system discussed herein may be used in most scenarios in which software systems need to be connected, for example, to embedded systems.

Implementations of the various techniques described herein may be implemented in digital electronic circuitry, or in computer hardware, firmware, software, or in combinations of them. Implementations may implemented as a computer program product, i.e., a computer program tangibly embodied in an information carrier, e.g., in a machine-readable storage device or in a propagated signal, for execution by, or to control the operation of, data processing apparatus, e.g., a programmable processor, a computer, or multiple computers. A computer program, such as the computer program(s) described above, can be written in any form of programming language, including compiled or interpreted languages, and can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program can be deployed to be executed on one computer or on multiple computers at one site or distributed across multiple sites and interconnected by a communication network.

Method steps may be performed by one or more programmable processors executing a computer program to perform functions by operating on input data and generating output. Method steps also may be performed by, and an apparatus may be implemented as, special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application-specific integrated circuit).

Processors suitable for the execution of a computer program include, by way of example, both general and special purpose microprocessors, and any one or more processors of any kind of digital computer. Generally, a processor will receive instructions and data from a read-only memory or a random access memory or both. Elements of a computer may include at least one processor for executing instructions and one or more memory devices for storing instructions and data. Generally, a computer also may include, or be operatively coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto-optical disks, or optical disks. Information carriers suitable for embodying computer program instructions and data include all forms of non-volatile memory, including by way of example semiconductor memory devices, e.g., EPROM, EEPROM, and flash memory devices; magnetic disks, e.g., internal hard disks or removable disks; magneto-optical disks; and CD-ROM and DVD-ROM disks. The processor and the memory may be supplemented by, or incorporated in special purpose logic circuitry.

To provide for interaction with a user, implementations may be implemented on a computer having a display device, e.g., a cathode ray tube (CRT) or liquid crystal display (LCD) monitor, for displaying information to the user and a keyboard and a pointing device, e.g., a mouse or a trackball, by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback, e.g., visual feedback, auditory feedback, or tactile feedback; and input from the user can be received in any form, including acoustic, speech, or tactile input.

Implementations may be implemented in a computing system that includes a back-end component, e.g., as a data server, or that includes a middleware component, e.g., an application server, or that includes a front-end component, e.g., a client computer having a graphical user interface or a Web browser through which a user can interact with an implementation, or any combination of such back-end, middleware, or front-end components. Components may be interconnected by any form or medium of digital data communication, e.g., a communication network. Examples of communication networks include a local area network (LAN) and a wide area network (WAN), e.g., the Internet.

While certain features of the described implementations have been illustrated as described herein, many modifications, substitutions, changes and equivalents will now occur to those skilled in the art. It is, therefore, to be understood that the appended claims are intended to cover all such modifications and changes as fall within the true spirit of the embodiments of the invention. 

1. A method comprising: determining one or more distributions, to service execution environments, of component services associated with a composite service associated with an analysis of data generated by one or more sensors, the composite service including an ordering of execution of the associated component services for the analysis of the data, at least one of the service execution environments located at a first network node associated with a device layer and at least one other one of the service execution environments located at a second network node associated with a middleware layer that includes a request handling layer and a device handling layer; determining an evaluation of each of the distributions of the component services based on a metric associating one or more weighted values with a consumption by the each distribution of one or more respective resources associated with each of the first and second network nodes; and determining a recommendation including one or more of the distributions based on the evaluation.
 2. The method of claim 1 wherein determining the evaluation comprises determining the evaluation based on a metric including a quality measure of distributions based on the consumption by the each distribution of the one or more respective resources associated with each of the first and second network nodes and on one or more performance measures.
 3. The method of claim 1 wherein determining the evaluation comprises determining the evaluation based on a metric including a quality measure of distributions in accordance with ${\sum\limits_{i = 1}^{N}{\sum\limits_{k = 1}^{R_{i}}{{n_{i}(k)}{C_{i}(k)}}}} + {\sum\limits_{< {ij} >}{n_{ij}C_{ij}}} + {t_{R}C_{R}}$ wherein N indicates a number of nodes, R_(i) indicates a number of resource types on each node i, n_(i)(k) indicates a resource consumption for resource k on node i, C_(i)(k) indicates a cost or weight of resource k on node i, n_(ij) indicates a resource consumption on an edge between nodes i and j, C_(ij) indicates a related resource cost or weight of the consumed resource between nodes i and j, t_(R) indicates a response time, and C_(R) indicates a cost or weight of the response time t_(R).
 4. The method of claim 1 further comprising: determining a model of the composite service including a first model node associated with a first one of the component services, a second model node associated with a second one of the component services, and a directed edge between the first and second model nodes based on the ordering of execution.
 5. The method of claim 4 further comprising: storing in a first storage device associated with the first model node a value indicating an amount of a first resource required by the first one of the component services; storing in a second storage device associated with the second model node a value indicating an amount of a second resource required by the second one of the component services; and storing in a third storage device associated with the directed edge a value indicating an amount of a third resource required by the composite service.
 6. The method of claim 1 further comprising: determining a model of network nodes that include the service execution environments, the model including a model node associated with each network node and a model edge associated with each network link connecting the network nodes.
 7. The method of claim 6 further comprising: storing in a storage device associated with each model node one or more values indicating amounts of one or more resources that are available for the component services; and storing in a storage device associated with each model edge one or more values indicating amounts of one or more resources that are available for the each network link.
 8. The method of claim 1 further comprising: determining a load model based on one or more parameters associated with one or more requests for the analysis of the data.
 9. The method of claim 8 wherein -the one or more requests for the analysis of the data is generated by a business application located at a backend system, and wherein one or more of the sensors is associated with a product embedded information device (PEID) located at the device layer.
 10. The method of claim 9 wherein the one or more requests for the analysis of the data is received from a product lifecycle management (PLM) application and wherein one or more of the sensors is configured to generate data associated with a specified product.
 11. The method of claim 9 wherein the metric specifies a first one of the weighted values associated with the first network node that is substantially different from a second one of the weighted values associated with the second network node, wherein the first and second ones of the weighted values are each associated with a substantially similar respective resource associated with each of the first and second network nodes.
 12. The method of claim 1 wherein the one or more respective resources includes one or more of memory, central processing unit (CPU) power, time, or bitrate.
 13. The method of claim 1 wherein the device layer includes one or more of a radio frequency identification (RFID) reader, a smart items device, a device within a sensor network, a sensor mote, or a product embedded information device.
 14. The method of claim 1 wherein one or more of the component services is configured to calculate one or more results using one or more of a linear regression, a moving average, a classification, a determination of a minimum value, a determination of a maximum value, threshold monitoring, a notification, a formatting of data, or a number of occurrences of an event or item.
 15. The method of claim 1 wherein one or more of the component services is configured to buffer data received from a sensor.
 16. A system comprising: a middleware layer including a request handling layer and a device handling layer, the middleware layer in communication with an application and a device layer including one or more devices, wherein the request handling layer includes: a service repository that is configured to store at least one composite service in association with service metadata describing an ordering of execution of component services of the composite service; and a distribution manager that is configured to: determine one or more distributions, to service execution environments, of the component services associated with the composite service associated with an analysis of data generated by one or more sensors, the composite service including the ordering of execution of the associated component services for the analysis of the data, at least one of the service execution environments located at a first network node included in the device layer and at least one other one of the service execution environments located at a second network node included in the middleware layer, determine an evaluation of each of the distributions of the component services based on a metric associating one or more weighted values with a consumption by the each distribution of one or more respective resources associated with each of the first and second network nodes, and determine a recommendation including one or more of the distributions based on the evaluation.
 17. The system of claim 16 wherein the device layer includes one or more of a radio frequency identification (RFID) reader, a smart items device, a device within a sensor network, a sensor mote, or a product embedded information device.
 18. The system of claim 16 wherein the service repository is configured to store one or more service executables and the service metadata associated with the composite service.
 19. The system of claim 16 further comprising: a model data storage device that is configured to store a model of the composite service including a first model node associated with a first one of the component services, a second model node associated with a second one of the component services, and a directed edge between the first and second model nodes based on the ordering of execution.
 20. A distribution manager configured to: determine one or more distributions, to service execution environments, of component services associated with a composite service associated with an analysis of data generated by one or more sensors, the composite service including an ordering of execution of the associated component services for the analysis of the data, at least one of the service execution environments located at a first network node included in the device layer and at least one other one of the service execution environments located at a second network node included in the middleware layer; determine an evaluation of each of the distributions of the component services based on a metric associating one or more weighted values with a consumption by the each distribution of one or more respective resources associated with each of the first and second network nodes; and determine a recommendation including one or more of the distributions based on the evaluation.
 21. The distribution manager of claim 20 wherein one or more of the component services is configured to calculate one or more results using one or more of a linear regression, a moving average, a classification, a determination of a minimum value, a determination of a maximum value, threshold monitoring, a notification, a formatting of data, or a number of occurrences of an event or item.
 22. The distribution manager of claim 20 wherein the device layer includes one or more of a radio frequency identification (RFID) reader, a smart items device, a device within a sensor network, a sensor mote, or a product embedded information device.
 23. The distribution manager of claim 20 wherein the one or more respective resources includes one or more of memory, central processing unit (CPU) power, time, or bitrate. 